package com.rainng.coursesystem.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;


@TableName("leader")
@Data
public class LeaderEntity {
    public String getPassword() {
		return password;
	}


	public static final String ID = "leader_id";
    public static final String AREA_ID = "leader_area_id";
    public static final String NUMBER = "leader_number";
    public static final String NAME = "leader_name";
    public static final String PASSWORD = "leader_password";

    @NotNull
    @TableId(value = ID, type = IdType.AUTO)
    private Integer id;

    @NotNull(message = "必须选择所属地区")
    @TableField(AREA_ID)
    private Integer areaId;

    @Length( message = "账号不能为空")
    @TableField(NUMBER)
    private String number;

    @NotBlank(message = "团长姓名不能为空")
    @TableField(NAME)
    private String name;

    @NotNull
    @TableField(PASSWORD)
    private String password;

	public Integer getId() { return id; }

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getAreaId() { return areaId; }

	public void setAreaId(Integer areaId) {
		this.areaId = areaId;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) { this.number = number; }

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}


	public void setPassword(String password) {
		this.password = password;
	}
    
}
